enum Color {
    red,
    green,
    blue
};

let color = Color.blue;
console.log(color);

// isomerism enum
enum Color2 {
    red = 2,
    blue,
    yellow = 'hello'
};
console.log(Color2.red, Color2.blue, Color2.yellow);
console.log(Color2[2]);

// computed enum
enum Obj {
    a,
    b = Obj.a,
    c = Math.random(),
    d = 1 + 2
};
console.log(Obj.a, Obj.b, Obj.c, Obj.d);

// const enum
const enum ConstColor {
    red,
    green,
    blue
};
console.log(ConstColor.red, ConstColor.green, ConstColor.blue);
